package com.lcredu.aop.aspectj;

import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @author 黎长容
 * @date 2025-07-15 16:49
 */
public class UsbInterfaceAspectTest {
    public static void main(String[] args) {

        ClassPathXmlApplicationContext ioc = new ClassPathXmlApplicationContext("beans08.xml");
//        UsbInterface usbInterface = ioc.getBean(UsbInterface.class);
        UsbInterface usbInterface01 = (UsbInterface) ioc.getBean("phone");
        UsbInterface usbInterface02 = (UsbInterface) ioc.getBean("camera");
        usbInterface01.work();
        System.out.println("======================");
        usbInterface02.work();
        System.out.println(usbInterface01.getClass());
    }
}
